Data

This data was taken from a clean dataset that Jae emailed out on October 25th, 2019.

Jae organized the retina by six different methods. He created OCTA variable scores for the overall image, 2 hemifields, 4 quadrants, 6 sectors, 12 clock hours, and an annular ring.

For now, only the overall image scoring will be analyzed.

I manually removed underscores from the names of each patient because it was causing uneven splitting of variables. This modified dataset is saved as all_quantification_10_24_19_DG.xlsx. I updated the names for every tab of the file.

Data Dictionary

Variable Label
ptid Patient Identification
eyeid Eye Identification
eye_imaged Eye Imaged
time_stamp Exam Date and Time
name_last Last Name
name_first First Name
female Female Sex
image_area Image Area
image_method Image Method
image_size Image Size
v_diameter Vessel Diameter (units?)
v_area_density Vessel Area Density (units?)
v_skeleton_density Vessel Skeleton Density (units?)
v_perimeter_index Vessel Perimeter Index (units?)
v_complexity_index Vessel Complexity Index (units?)
flow_impair_zone Flow Impairment Zone (units?)
flux Flux (units?)

Data Wrangling

Rename Variables

This section will rename the variables to match the dictionary

Label Variables

This section will label variables appropriately.

Single Eye Participation

Venugopal (2019) et al. ran the analysis including all eyes.1 Then they re-ran the analysis after selecting only a single eye randomly from each individual. They conclude minimal difference in the findings, and they report only the analysis that includes all eyes:

“The entire analysis was repeated considering one eye per subject (one eye was randomly chosen from subjects contributing both eyes for the primary analysis) and all the results were similar to the primary analysis.”1

Based on this, analysis was performed on all eyes. If time permits, remove a random eye later.

Subsetting Cohorts

Intra-Visit Data

Intra-visit data was restricted to all measurements of the same eye that occurred on the same day. Some people had multiple measurements on multiple days. Their first day was included only.

Inter-Visit Data

Inter-visit data was restricted to the first measurement of the day for each eye. If a patient had their right eye measured:

  • 3 times on Monday

  • 5 times on Wednesday, and

  • 2 times on Friday,

Then they would have three observations in this dataset:

  • The first measurement from Monday,

  • The first measurement from Wednesday, and

  • The first measurement from Friday.

Data Flow Chart

This tallies how many participants, how many eyes, and how many measurements are included in the two datasets.

dataset n_participants n_eyes n_measurements
Intra-Visit 88 88 214
Inter-Visit 88 88 241

Table 1: Summary Statistics

The Venugopal papers dichotomize glaucoma. But there’s no glaucoma indicator variable in this data.

Intra-Visit OCTA Summary Statistics

Variables in intra-visit dataset

Overall
n 214
Sociodemographics
Female Sex = Male (%) 107 ( 50.0)
Image Specifications
Eye Imaged = Right (%) 112 ( 52.3)
Image Area = ONH (%) 214 (100.0)
Image Method = Angiography (%) 214 (100.0)
Image Size = 6x6 (%) 214 (100.0)
OCTA Measures
v_diameter (mean (SD)) 25.85 (1.68)
v_area_density (mean (SD)) 0.31 (0.08)
v_skeleton_density (mean (SD)) 0.12 (0.04)
v_perimeter_index (mean (SD)) 0.29 (0.07)
v_complexity_index (mean (SD)) 4692.44 (1199.83)
flow_impair_zone (mean (SD)) 7.57 (4.23)
flux (mean (SD)) 0.11 (0.03)

Inter-Visit OCTA Summary Statistics

Variables in inter-visit dataset

Overall
n 241
Sociodemographics
Female Sex = Male (%) 120 ( 49.8)
Image Specifications
Eye Imaged = Right (%) 124 ( 51.5)
Image Area = ONH (%) 241 (100.0)
Image Method = Angiography (%) 241 (100.0)
Image Size = 6x6 (%) 241 (100.0)
OCTA Measures
v_diameter (mean (SD)) 26.03 (1.70)
v_area_density (mean (SD)) 0.30 (0.08)
v_skeleton_density (mean (SD)) 0.12 (0.04)
v_perimeter_index (mean (SD)) 0.27 (0.07)
v_complexity_index (mean (SD)) 4492.18 (1187.60)
flow_impair_zone (mean (SD)) 8.18 (4.27)
flux (mean (SD)) 0.10 (0.03)

Exploratory Data Analysis

Scatter Plots

Scatter plots of OCTA variables by Subject ID for about 10 individuals randomly sampled. These are separated by intra- and inter-visit datasets, and are useful for understanding the data better.

Vessel Area Density

Vessel Diameter

Vessel Skeleton Density

Vessel Perimeter Index

Vessel Complexity Index

Flow Impairment Zone

Flux

Spaghetti Plots

Spaghetti plots of OCTA variables for about 10 individuals randomly sampled.

Vessel Area Density

Vessel Diameter

Vessel Skeleton Density

Vessel Perimeter Index

Vessel Complexity Index

Flow Impairment Zone

Flux

Bland-Altman Plots

Coding of Bland-Altman (BA) plots is explained in this blog post.

Intra-Visit Bland-Altman Plots

Intra-Visit Bland-Altman Plots of OCTA Variables

Vessel Area Density

Vessel Diameter

Vessel Skeleton Density

Vessel Perimeter Index

Vessel Complexity Index

Flow Impairment Zone

Flux

Outliers

Assess some of the observations outside of expected limits.

eyeid ptid female eye_imaged image_area image_size image_method exam_date time_stamp v_diameter v_area_density v_skeleton_density v_perimeter_index v_complexity_index flow_impair_zone flux n_msr_day order_obs
51 282473 Female Right ONH 6x6 Angiography 2018-06-06 2018-06-06 08:40:00 25.03389 0.3811085 0.1522370 0.3481414 5517.964 4.0329 0.14150658 2 1
51 282473 Female Right ONH 6x6 Angiography 2018-06-06 2018-06-06 08:40:26 25.52803 0.3605025 0.1412183 0.3282933 5412.678 5.2905 0.13014265 2 2
55 628341 Male Left ONH 6x6 Angiography 2019-06-07 2019-06-07 14:30:44 24.53498 0.3718723 0.1515682 0.3430341 5621.532 4.1269 0.13333081 3 1
55 628341 Male Left ONH 6x6 Angiography 2019-06-07 2019-06-07 14:31:19 24.45874 0.3860956 0.1578559 0.3563790 5710.796 3.5827 0.14213672 3 2
55 628341 Male Left ONH 6x6 Angiography 2019-06-07 2019-06-07 14:31:50 24.62919 0.3793043 0.1540060 0.3495999 5713.691 4.1882 0.13890928 3 3
56 6542715 Female Right ONH 6x6 Angiography 2018-06-08 2018-06-08 09:22:14 25.70501 0.2663560 0.1036202 0.2462561 3825.469 8.9426 0.08969395 2 1
56 6542715 Female Right ONH 6x6 Angiography 2018-06-08 2018-06-08 09:23:17 26.02038 0.2602573 0.1000206 0.2405786 3958.728 11.6038 0.09288434 2 2
122 747043 Female Left ONH 6x6 Angiography 2017-09-15 2017-09-15 13:29:19 26.13493 0.3243581 0.1241090 0.2873470 4945.099 9.6220 0.11314033 2 1
122 747043 Female Left ONH 6x6 Angiography 2017-09-15 2017-09-15 13:29:47 25.72199 0.3567205 0.1386831 0.3149932 5533.114 7.5460 0.12805994 2 2

Inter-Visit Bland-Altman Plots

Inter-Visit Bland-Altman Plots of OCTA Variables

Vessel Area Density

Vessel Diameter

Vessel Skeleton Density

Vessel Perimeter Index

Vessel Complexity Index

Flow Impairment Zone

Flux

Outliers

Assess some of the observations outside of expected limits.

eyeid ptid female eye_imaged image_area image_size image_method exam_date time_stamp v_diameter v_area_density v_skeleton_density v_perimeter_index v_complexity_index flow_impair_zone flux order_obs
30 193139 Female Right ONH 6x6 Angiography 2016-09-09 2016-09-09 15:13:23 24.95773 0.3409613 0.13661550 0.3115733 4845.529 5.2435 0.11829176 1
30 193139 Female Right ONH 6x6 Angiography 2018-07-11 2018-07-11 11:18:55 25.24157 0.3166435 0.12544527 0.2918433 4608.987 6.9459 0.10589793 2
42 2150911 Male Right ONH 6x6 Angiography 2017-02-02 2017-02-02 09:15:53 26.94637 0.2145392 0.07961710 0.2007696 3298.724 11.0883 0.07057351 1
42 2150911 Male Right ONH 6x6 Angiography 2018-03-16 2018-03-16 09:03:54 26.60005 0.2344228 0.08812869 0.2154262 3551.065 12.3900 0.07857757 2
45 2268221 Female Left ONH 6x6 Angiography 2016-04-08 2016-04-08 15:25:44 25.11434 0.3731333 0.14857380 0.3410502 5687.600 5.3738 0.13009700 1
45 2268221 Female Left ONH 6x6 Angiography 2018-08-01 2018-08-01 11:34:29 24.54865 0.3731573 0.15200725 0.3423031 5707.032 5.3639 0.12922023 2
75 6940843 Male Left ONH 6x6 Angiography 2018-07-18 2018-07-18 09:56:10 25.37832 0.4223047 0.16640369 0.3680908 6359.073 2.6864 0.16243546 1
75 6940843 Male Left ONH 6x6 Angiography 2019-03-13 2019-03-13 08:56:32 25.25471 0.4266211 0.16892735 0.3725527 6474.232 3.0850 0.16338852 2
138 977501 Male Left ONH 6x6 Angiography 2018-05-11 2018-05-11 10:12:42 24.57280 0.3553664 0.14461779 0.3278794 5318.858 5.2991 0.12631827 1
138 977501 Male Left ONH 6x6 Angiography 2018-08-01 2018-08-01 08:51:34 24.26424 0.3577314 0.14743150 0.3298662 5429.081 5.4164 0.12393681 2

Intra-Visit Repeatability

Intra-Visit Repeatability of OCTA Variables

Calculate the within-subject standard deviation \((S_w)\), the within-subject coefficient of repeatability \((CR_w)\), and the within-subject coefficient of variation \((CV_w)\) for a given measurement variable \(x\).

Table 2: Repeatability

Table 2 shows repeatability estimates of vessel density measurements.

This table was modeled after Table 2 in Venugopal (2018).2 They stratified these values by dichotomous glaucoma status, but we’re not sure if that is appropriate.

var_name µ Sw CRw CVw
Vessel Diameter (units?) 25.847 0.333 0.923 1.289
Vessel Area Density (units?) 0.312 0.017 0.048 5.600
Vessel Skeleton Density (units?) 0.123 0.007 0.021 6.099
Vessel Perimeter Index (units?) 0.286 0.016 0.044 5.528
Vessel Complexity Index (units?) 4692.437 255.192 707.356 5.438
Flow Impairment Zone (units?) 7.571 1.071 2.969 14.147
Flux (units?) 0.110 0.007 0.019 6.309

I still need to figure out how they calculated the 95% CIs, which I think is just \(1.96*\sqrt{SE}\) because they all appear symmetric, but I’m not sure yet. Then I need to stratify these stats by glaucoma diagnosis (yes/no). - DG 8/29/2019

Bruce showed me a paper that has the calculation of the confidence intervals. It’s not difficult to manually code them, just need to read the paper. - DG 9/4/2019

Calculating Repeatability Statistics

Explanations of repeatability statistic calculations

Within-Subject Mean \((\mu_w)\)

\(\mu_w\) is the average measurement of both eyes for each individual. The overall mean \((\mu)\) is calculated by taking the mean of \(\mu_w\) across the dataset. The overall mean is included in the final table for reference.

\[ \mu_w = \frac{1}{M}\sum_{i=1}^{M} x_i \]

\[\text{where } M \text{ is the number of measurements per eye,}\]

Within-Subject Standard Deviation \((S_w)\)

Find \(S_w\) by first calculating the variance of the measurements per individual eye. The equation below is general for any number of measurements, but in this study there are only 2 measurements per eye.

\[ \sigma^2_{measurement} = \frac{1}{M}\sum_{i=1}^{M} (x_i - \mu_w)^2 \]

\[ \text{where } M \text{ is the number of measurements per eye} \]

To calculate \(S_w\), average of the variance of measurements \((\sigma^2_{measurement})\) for all eyes measured, then take the square root.

\[ Sw = \sqrt{\frac{1}{N}\sum_{i=1}^{N}\sigma^2_{measurement,i}} \]

\[ \text{where } N \text{ is the number of eyes measured} \]

Within-Subject Coefficient of Repeatability \((CR_w)\)

The \(CR_w\) provides the uncertainty of repeated measures.

\[ CRw = \sqrt2 * 1.96 * Sw \]

The \(CR_w\) can be interpreted as:

“The difference between two measurements for the same subject is expected to be less than [\(CR_w\)] for 95% of pairs of observations.”3

Within-Subject Coefficient of Variation \((CV_w)\)

\[ CVw = 100 *\frac{Sw}{\mu} \]

Intraclass Correlation Coefficient

Intraclass Correlation Coefficient (ICC)

Intra-Visit ICC

V1 ICC LowerCI UpperCI N k varw vara
v_diameter 0.961 0.943 0.973 88 2.431 0.112 2.715
v_area_density 0.958 0.939 0.972 88 2.431 0.000 0.007
v_skeleton_density 0.961 0.944 0.974 88 2.431 0.000 0.001
v_perimeter_index 0.959 0.940 0.972 88 2.431 0.000 0.005
v_complexity_index 0.957 0.938 0.971 88 2.431 61719.750 1387865.145
flow_impair_zone 0.939 0.912 0.958 88 2.431 1.099 16.873
flux 0.958 0.939 0.971 88 2.431 0.000 0.001

Inter-Visit ICC

V1 ICC LowerCI UpperCI N k varw vara
v_diameter 0.920 0.887 0.944 88 2.734 0.234 2.682
v_area_density 0.928 0.898 0.950 88 2.734 0.000 0.006
v_skeleton_density 0.930 0.902 0.952 88 2.734 0.000 0.001
v_perimeter_index 0.930 0.901 0.952 88 2.734 0.000 0.005
v_complexity_index 0.926 0.896 0.949 88 2.734 104750.902 1317257.975
flow_impair_zone 0.870 0.820 0.909 88 2.734 2.377 15.959
flux 0.913 0.877 0.939 88 2.734 0.000 0.001

Calculating ICC Statistic

\[ \text{ICC} = \frac{\text{between}}{\text{between} + \text{within}}\]

“In the output for the random effects model ‘SID’ is the estimated between-group variance, which in the ICCest output is called ‘vara’ (variance among groups). The within-group variance is ‘Residual’ in the random effects model output, while in ICCest it’s called ‘varw.’ You can see that the values for those two variances match perfectly in the two different outputs. The ICC is defined as between/(between+within). That calculation is not part of the random effects model output, but it is part of the ICCest output, along with confidence intervals for the ICC estimate. The ICC are really high for intravisit (around 97%) and a little lower for intervisit (about 94%). If we were to calculate these ICC for glaucoma and controls separately I think they would be significantly lower because of the reduced between-group variability.” - BB 9/4/2019

Mixed Effects Regression Models

Model Fitting

“For the markdown file let’s just spit out all the output from the random effects model and the iccest command so we can show it to Grace. Eventually we can put the ICC in the table with the other repeatability measures you have already tabled but I don’t think we need it for the meeting. I also added a model to test whether SS influences reliability. The reference level is ‘10’ now, which is what we want, and you can see that SS is highly associated with VAD, meaning it affects reliability.” - BB 9/4/2019

## Linear mixed model fit by REML ['lmerMod']
## Formula: v_area_density ~ (1 | ptid)
##    Data: data_octa_global_intra
## 
## REML criterion at convergence: -776.7
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -4.5205 -0.4207 -0.0321  0.4433  4.4693 
## 
## Random effects:
##  Groups   Name        Variance Std.Dev.
##  ptid     (Intercept) 0.006630 0.08143 
##  Residual             0.000288 0.01697 
## Number of obs: 214, groups:  ptid, 88
## 
## Fixed effects:
##             Estimate Std. Error t value
## (Intercept)  0.30807    0.00876   35.17

References

1. Venugopal JP, Rao HL, Weinreb RN, et al. Repeatability and comparability of peripapillary vessel density measurements of high-density and non-high-density optical coherence tomography angiography scans in normal and glaucoma eyes. The British Journal of Ophthalmology 2019;103:949–954.

2. Venugopal JP, Rao HL, Weinreb RN, et al. Repeatability of vessel density measurements of optical coherence tomography angiography in normal and glaucoma eyes. The British Journal of Ophthalmology 2018;102:352–357.

3. Bland JM, Altman DG. Statistics Notes: Measurement error. BMJ : British Medical Journal 1996;313:744.